# v429 — Guarded Stripe Checkout Session Creation in Locked Test Mode

Status: Completed in v429  
Scope: Stripe Checkout test-session creation path, guarded by Super Admin approvals and environment flags.

## Summary

v429 adds the first guarded Stripe Checkout test-session creation path to the existing workspace-authenticated checkout route. This is not live checkout. The route can create a Stripe Checkout test session only when all of these are true:

- `DISPATCH_SPOT_STRIPE_CHECKOUT_TEST_SESSION_CREATION_ENABLED="true"`;
- Stripe secret key is a test key;
- `STRIPE_PLATFORM_BILLING_TEST_MODE` is not false;
- payment collection remains off;
- the workspace is an eligible paid public-signup workspace type;
- the workspace has a trial subscription and a trial end date;
- the selected plan is Stripe/Test/Ready or Stripe/Test/Synced with a monthly price ID;
- Super Admin checkout-session readiness approval switches are complete.

The checkout URL is withheld by default using `DISPATCH_SPOT_STRIPE_CHECKOUT_SESSION_URL_RETURN_ENABLED="false"`.

## Guardrails

- No hard billing gates changed.
- No broker distribution limits changed.
- No owned portal rules changed.
- No internal load-board access changed.
- No customer portal session is created.
- No checkout URL is returned by default.
- No Prisma schema changes were made.

## Files touched

- `src/modules/subscriptions/stripe-checkout-route-scaffold.service.ts`
- `src/modules/subscriptions/stripe-checkout-preparation.service.ts`
- `app/api/subscriptions/stripe-checkout/route.ts`
- `components/admin/admin-stripe-checkout-preparation-panel.tsx`
- `app/(dashboard)/billing/page.tsx`
- `.env.example`
- `Project Documentation/Active/CHANGELOG.md`
- `Project Documentation/Active/PROJECT_HANDOFF.md`